package com.app.web.common
import com.app.constant.CommonConstant
import com.app.web.BaseAction
import groovy.transform.CompileStatic
import groovy.transform.TypeChecked
import org.apache.shiro.authz.annotation.RequiresUser
import org.springframework.stereotype.Component

import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType
/**
 * Created by three on 14-9-16.
 */
@Component
@CompileStatic
@TypeChecked
@Path("/config")
class ConfigAction extends BaseAction {

    @GET
    @Path("/constant")
    @Produces(MediaType.APPLICATION_JSON)
    @RequiresUser
    Map<String, Object> constant() {

        Map<String, Object> map = new HashMap<String, Object>();

        map.put(CommonConstant.FunctionPosition.getSimpleName(), CommonConstant.FunctionPosition.values());

        return map;
    }

}
